class_name InteractiveArea
extends Area2D


@export var tip_node: CanvasItem

signal interacted


func _ready() -> void:
    body_entered.connect(
        func(body: Node2D) -> void:
            if not body is Player:
                return
            
            InteractionManager.add_interaction(self)
    )

    body_exited.connect(
        func(body: Node2D) -> void:
            if not body is Player:
                return
            
            InteractionManager.remove_interaction(self)
    )

    tip_node.hide()

